*********************************
*  CREDITS			*
*********************************

This plugin was originally created by Lee Penney, you can find out more about him at his blog, The Digerati Peninsula (www.thedigeratipeninsula.org.uk).  He also maintains a site with various WordPress add-ons and plugins at www.viewfinderdesign.co.uk which you might find useful.

The plugin is released completely free of charge and with no restrictions, feel free to use it and amend it however you like.

If you find the plugin useful, please think about making a donation at: www.viewfinderdesign.co.uk/donate/


*********************************
*  INSTALLATION			*
*********************************

Unzip the files

Open the add-book.php file in the book_reading directory and edit the $post_categories[0] category ID number, you can find this on the Manage->Categories page of the WordPress admin section, e.g.

$post_categories[0] = 1;

if you want to put the books in more than one category, add as many as you need as follows:

$post_categories[0] = 1;
$post_categories[1] = 2;
$post_categories[2] = 3;

Save the file and upload the book_reading directory to the plugins directory

Upload book-new.php file to the wp-admin directory

Login to you WordPress admin section and activate the Book Reading plugin


*********************************
*  TO ADD A BOOK ENTRY		*
*********************************

Once the plugin has been activated you will find that you now have another option on the Write menu, alongside Write Post and Write Page you will also see the option for Write Book Entry.

If you click this you'll see the Write Book Entry page.

The Book Title box, rather obviously, is where you type in the book's title.

The Author box allows you to put in the book's author.

The Recommend drop-down allows you to pick if you would recommend the book (yes or no).

The Review Text box works like the ordinary WordPress content box and lets you add comments, information or a review of the book.

The Book Link box allows you to assign a URL to the book, for example, if you wanted to link the review to a page on Amazon where people could buy a copy.

The Image URL box is used if you want to associate an image with the book (the cover, for example).

Edit Timestamp allows you to select when the entry will appear (so you can delay it's appearance on the site).

Once you've filled the details in, hit Create New Book Entry.


*********************************
*  HOW TO USE			*
*********************************

The Book Reading Plugin provides several ways to get the information so you can include it in your posts:

get_book_image()

This function grabs the text that you put in the Image URL box.

Usage: 
$variable = get_book_image(post_ID*);
echo "<img src=\"$variable\" />";

* in a typical post template you can use $id to provide the post_ID


get_book_author()

This function grabs the text that you put in the author box.

Usage: 
$variable = get_book_author(post_ID*);
echo "<img src=\"$variable\" />";

* in a typical post template you can use $id to provide the post_ID


get_book_link()

This function grabs the text that you put in the Book Link box.

Usage: 
$variable = get_book_link(post_ID*);
echo "<img src=\"$variable\" />";

* in a typical post template you can use $id to provide the post_ID


get_book_recommendation()

This function grabs the option you picked from the recommend drop-down.

Usage: 
$variable = get_book_recommendation(post_ID*);
echo "<img src=\"$variable\" />";

* in a typical post template you can use $id to provide the post_ID


get_books()

This retrieves all of the posts in the category you supply and extracts the meta info and then packages it in a format that can easily be used.

Usage:
$variable = get_books(cat_ID*);

* the category ID for each category can be found on the categories page of the admin section


display_books()

This is a quick and easy way of showing all of the posts in the category you supply with the meta info formatted and output.  This is default to show how it can be done, just edit the html/php in the book_reading.php file to change the way it look, then drop it into your page.php template file to create a complete reading page/book list.

Usage:
display_books(cat_ID*);

* the category ID for each category can be found on the categories page of the admin section


get_books_by_author()

I've left this function in though it was only really built for me.  It retrieves a list of all the books, groups those with the same author, then outputs them along with some of their details alphabetically by author.

For an example of what it does, check out the reading page on my blog at: http://www.thedigeratipeninsula.org.uk/reading/
